import request from "@/utils/request";

export function getHospList(currentPage, currentSize, searchObj) {
  return request({
    url: `/admin/hosp/hospitalSet/findPageHospSet/${currentPage}/${currentSize}`,
    method: "post",
    data: searchObj
  });
}

export function getHospById(id) {
  return request({
    url: `/admin/hosp/hospitalSet/getHospSet/${id}`,
    method: "get"
  });
}

export function saveHospSet(hospitalSet) {
  return request({
    url: `/admin/hosp/hospitalSet/saveHospitalSet`,
    method: "post",
    data: hospitalSet
  });
}

export function updateStatus(id, status) {
  return request({
    url: `/admin/hosp/hospitalSet/updateHospitalSet/${id}/${status}`,
    method: "get"
  });
}

export function lockHospSet(id, status) {
  return request({
    url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
    method: "put"
  });
}

export function removeHospSet(id) {
  return request({
    url: `/admin/hosp/hospitalSet/${id}`,
    method: "delete"
  });
}
